<style>
    #view-content p{text-align: center;}
</style>
<link rel="stylesheet" href="<?=$this->baseUrl()?>/css/backend.venue.index.css" />
<script type="text/javascript" src="<?=$this->baseUrl()?>/js/backend.venue.index.js"></script>
<div id="view-content" baseurl="<?=$this->baseUrl()?>" fid="<?=$this->floor['floor_id']?>">
    <?php if(!isset($this->floor)): ?>
    <p>
        Please choose a floor or create new floor from sub-menu above.
    </p>
    <?php else: ?>
    <center><h3><?=$this->floor['name']?> (<?=$this->floor['abbreviation']?>)</h3></center>
    <center><div id="image"></div></center>
    <div id="link-modify">
        <a class="nyroModal" href="<?=$this->baseUrl()?>/backend/venue/edit/fid/<?=$this->floor['floor_id']?>">Edit Floor</a>
        &nbsp;-&nbsp;
        <a id="link-delete" href="#delete" fid="<?=$this->floor['floor_id']?>">Delete Floor</a>
        &nbsp;-&nbsp;
        <a class="nyroModal" href="<?=$this->baseUrl()?>/backend/venue/upload/type/floor/id/<?=$this->floor['floor_id']?>">Change Picture</a>
        &nbsp;-&nbsp;
        <a class="nyroModal" href="<?=$this->baseUrl()?>/backend/venue/addvenue/fid/<?=$this->floor['floor_id']?>">Add Venue</a>
    </div>
    <div id="vlist">
        <div id="table-header">
            <div class="name">Name</div>
            <div class="description">Description</div>
            <div class="size">Size (sqm)</div>
            <div class="capacity">Capacity (person)</div>
            <div class="cost">Cost/day</div>
            <div class="act">Action</div>
        </div>
        <div id="table-content">
            <?php foreach($this->venues as $val): ?>
            <div class="table-row" vid="<?=$val['venue_id']?>">
                <div class="name data" id="vname"><?= $val['name'] ?></div>
                <div class="description data"><?= $val['description'] ?></div>
                <div class="size data"><?= $val['size'] ?></div>
                <div class="capacity data"><?= $val['capacity'] ?></div>
                <div class="cost data"><?= $val['cost'] ?></div>
                <div class="act">
                    <a class="nyroModal" href="<?=$this->baseUrl()?>/backend/venue/edit/vid/<?=$val['venue_id']?>" title="Edit"><img src="<?= $this->baseUrl() ?>/images/icons/pencil.png" alt="edit" /></a>
                    <a class="link-delete" href="#delete" vid="<?=$val['venue_id']?>" title="Delete"><img src="<?= $this->baseUrl() ?>/images/icons/cross.png" alt="delete" /></a>
                </div>
            </div>
            <?php endforeach; ?>
        </div> <!-- end of table-content -->
    </div>
    <form id="frmFloorDelete" action="<?=$this->baseUrl()?>/backend/venue/delete" method="post">
        <input type="hidden" name="fid" id="fid" value="" />
    </form>
    <form id="frmVenueDelete" action="<?=$this->baseUrl()?>/backend/venue/delete" method="post">
        <input type="hidden" name="vid" id="vid" value="" />
        <input type="hidden" name="floor_id" value="<?=$this->floor['floor_id']?>" />
    </form>
    <?php endif; ?>
</div>